package com.wyz.saas.app.set.ui

import android.graphics.Bitmap
import com.atom.annotation.Impl
import com.wyz.saas.api.set.AppSetDescriptor
import com.wyz.saas.api.set.AppSetter
import com.wyz.saas.app.R
import com.wyz.saas.common.set.AbstractAppSetDescriptorDouble

@Impl(api = AppSetDescriptor::class)
class AppSetAuthDoubleDescirptor : AbstractAppSetDescriptorDouble() {

    companion object {
        const val NAME = "mine_money"
    }

    override fun get(): Double? {
        return mApiContext.getImpl(AppSetter::class.java)?.get(NAME)?.toDouble()
    }

    override fun put(t: Double) {
        mApiContext.getImpl(AppSetter::class.java)?.set(NAME, t)
    }


    override fun getTip(): String {
        return "资产"
    }

    override fun getGroup(): String {
        return "MINE"
    }

    override fun getIcon(): Bitmap? {
        return mApiContext.getBitmap(R.mipmap.icon_mine)
    }

    override fun getLabel(): String {
        return "我的资产"
    }
}